package io.bdmc.modules.bss.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author HuangLu
 * @since 2019-02-15
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SmkMuser extends Model<SmkMuser> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "user_id", type = IdType.AUTO)
    private Long userId;

    /**
     * 维修单位id
     */
    private Long maintId;

    /**
     * 姓名
     */
    private String username;

    private String password;
    /**
     * 手机号
     */
    private String mobile;

    /**
     * 微信名称
     */
    private String wxName;

    /**
     * 微信头像
     */
    private String wxImage;

    /**
     * openid
     */
    private String openid;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;



    @TableField(exist = false)
	private String maintName;

    @Override
    protected Serializable pkVal() {
        return this.userId;
    }

    @Override
    public String toString() {
        return "SmkMuser{" +
        "userId=" + userId +
        ", maintId=" + maintId +
        ", username=" + username +
        ", mobile=" + mobile +
        ", wxName=" + wxName +
        ", wxImage=" + wxImage +
        ", openid=" + openid +
        ", createTime=" + createTime +
        "}";
    }
}
